//
//  HLHomeController.swift
//  MyBlog
//
//  Created by 李芙蓉 on 16/3/4.
//  Copyright © 2016年 hanlei. All rights reserved.
//

import UIKit

class HLHomeController: HLOriginController {
    
    //视图模型
    var homeViewModel : HLHomeViewModel = HLHomeViewModel()

    override func viewDidLoad() {
        super.viewDidLoad()
        
        print(homeViewModel.users)
        
        if isVisitor {
            
            view = HLVisitorView(headImageName: nil, description: nil, frame: CGRect(x: 0, y: 0, width: sWidth, height: sHeight))
        
        } else {
            
            setupNavigationItem()
            
            return
        }
    }
    
    //加载navigationItem两侧按钮
    private func setupNavigationItem () {
        
        navigationItem.leftBarButtonItem = UIBarButtonItem(imageName: "navigationbar_friendsearch", target: self, action: "addFriendButtonDidClick")
        
        navigationItem.rightBarButtonItem = UIBarButtonItem(imageName: "navigationbar_pop", target: self, action: "swapButtonDidClick")
    }

    //添加好友按钮
    @objc private func addFriendButtonDidClick () {
        
    }
    
    //扫一扫按钮
    @objc private func swapButtonDidClick () {
        
    }
}

extension HLHomeController {
    
//    override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
//        
//        
//    }
//    
//    override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
//        
//        
//    }
}
